<template>
  <div class="app-container">
    <div class="ProductionDynamic">
      <!-- 头部 -->
      <div class="ProductionDynamicHeader">
        <Find :OriginalFilter="{ static: true }" :formList="formList" @findClicked="findData" />
      </div>

      <!-- 主体 -->
      <div class="ProductionDynamicMain">
        <el-card class="ProductionDynamicMainCard" shadow="always" :body-style="{ padding: '5px' }">
          <div class="ProductionDynamicMainCardHeader">
            <h1 class="MainLeftCardH1">材料订单明细</h1>
            <Table :tableData="tableData" :tableHeader="tableHeader" :selection="true" />
          </div>
          <div class="ProductionDynamicMainCardBottom" style="margin-top: 15px">
            <div style="display: flex">
              <el-form-item style="font-size: 9px; height: 15px" label="指令单号">
                <el-input placeholder=" " class="MainRightMainPoInput" />
              </el-form-item>

              <el-form-item style="margin-left: 23px; font-size: 9px; height: 15px" label="材料名称">
                <el-input placeholder=" " class="MainRightMainPoInput" />
              </el-form-item>
            </div>

            <div>
              <el-button class="save" type="primary" size="default" @click="">保存</el-button>
              <el-button type="primary" size="default" @click="">打印</el-button>
            </div>
          </div>
          <!-- card body -->
        </el-card>
      </div>
    </div>
  </div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue'
import JMessage from '@/utils/JMessage'
export default defineComponent({
  name: 'MaterialsPleasePurchaseInquiryKa'
})
</script>
<script lang="ts" setup>
import { i18n, Jzhcn } from '@/i18n'
import Find from '@/components/Find/index.vue'
const formList = ref([
  {
    type: 'select',
    selectValue: '材料类型',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '订购类型',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'input',
    inputPlaceholder: '订购单号',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入型体',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入指令',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入材料编码',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入材料名称',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入材料颜色',
    inputValue: ''
  },
  {
    type: 'select',
    selectValue: '厂商',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '采购员',
    selectLabel: '',
    selectOptions: [
      {
        optionKey: '1',
        optionValue: '111111',
        optionLabel: 'option1'
      },
      {
        optionKey: '2',
        optionValue: '222222',
        optionLabel: 'option2'
      },
      {
        optionKey: '3',
        optionValue: '333333',
        optionLabel: 'option3'
      }
    ]
  },
  {
    type: 'date',
    dateLabel: '订单日期',
    dateValue: ''
  },
  {
    type: 'button',
    checkboxLabel: '置空',
    bgColor: '#1890FF'
  },
  {
    type: 'button',
    checkboxLabel: '按查询导出明细'
  }
])
const findData = (data: any) => {
  console.log(data)
}
// 表格数据
const tableData = [
  {
    date: '20230427',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-02',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-04',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  },
  {
    date: '2016-05-01',
    name: 'Tom',
    address: '12312'
  }
]

const tableHeader = ref([
  {
    label: '材料类型',
    prop: 'customer',
    width: '71px'
  },
  {
    label: '订购类型',
    prop: 'instruction',
    width: '71px'
  },
  {
    label: '订购单号',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '采购员',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '指令',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '型体',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '料号',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '颜色',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '品名',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '规格',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '单位',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '订购日期',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '需求交期',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '厂商回复交期',
    prop: 'shape',
    width: '100px'
  },
  {
    label: '厂商',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '订购数量',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '单价',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '金额',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '入库数量',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '入库日期',
    prop: 'shape',
    width: '71px'
  },
  {
    label: '备注',
    prop: 'shape',
    width: '135px'
  }
])
</script>

<style lang="less" scoped>
// 主体底
.ProductionDynamicMainCardBottom {
  display: flex;
  justify-content: space-between;
}

.MainLeftCardH1 {
  font-size: 16px;
  margin-bottom: 10px;
}

// Input 输入框的样式
.MainRightMainPoInput {
  width: 88px;
  height: 25px;
}

:deep(.ProductionDynamicMainCardBottom .el-input__wrapper) {
  background-color: #fff5eb;
}

.save {
  color: black;
  border: 1px solid #e7e7e7;
  background: #e7e7e7;
}
</style>
